<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>答案页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1865894_c7fmn99i79s.css">
</head>
<body>
<!--<fieldset class="layui-elem-field layui-field-title" >
    <div class="layui-header">考试结果页</div>
</fieldset>-->
<blockquote class="layui-elem-quote layui-quote-nm" style="border: white;padding-top: 55px">
    <div style="padding: 15px; background-color: #F2F2F2;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="layui-card" style="height: 580px">
                    <div class="layui-row">
                        <div class="layui-col-md8 layui-col-md-offset3" style="text-align: left;top: 100px" th:each="item : ${questionList.list}">
                            <div class="layui-row" style="font-size: large;" >
                                <div style="float: left;">
                                    <span th:text="|${questionList.pageNum}、|"></span>
                                    <span th:text="${item.questionName}">钢铁是怎么炼成的？</span>
                                    <span th:text="|(${item.questionScore} 分)|"></span>
                                </div>
                                <input type="hidden" name="result"/>
                            </div>
                            <div class="layui-row" style="float: left;margin-left: 20px">
                                <div class="layui-row" style="margin: 30px;background: whitesmoke">
                                    <input class="layui-icon  layui-icon-circle" type="radio" name="title"  style="font-size: 12px" value="A"/> A、<span th:text="${item.resultA}">钢铁是怎么炼成铜的</span>
                                </div>
                                <div class="layui-row" style="margin: 30px;background: whitesmoke">
                                    <input class="layui-icon  layui-icon-circle" type="radio" name="title" style="font-size: 12px" value="B"/> B、<span th:text="${item.resultB}">钢铁是怎么炼成铜的</span>
                                </div>
                                <div class="layui-row" style="margin: 30px;background: whitesmoke">
                                    <input class="layui-icon  layui-icon-circle" type="radio" name="title" style="font-size: 12px" value="C"/> C、<span th:text="${item.resultC}">钢铁是怎么炼成铜的</span>
                                </div>
                                <div class="layui-row" style="margin: 30px;background: whitesmoke">
                                    <input class="layui-icon  layui-icon-circle" type="radio" name="title" style="font-size: 12px" value="D"/> D、<span th:text="${item.resultD}">钢铁是怎么炼成铜的</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row" style="margin-top: 180px">
                        <div class="layui-header" style="margin-left: 100px;">你的答案: <span id="word" th:text="${word}"></span></div>
                        <div class="layui-header" style="margin-left: 100px">正确答案: <span id="solution" th:text="${solution}"></span></div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-card" style="height: 50px">
                    <div class="layui-card-header" style="font-size: 20px">
                        考试得分：<span th:text="${all}"> 10</span>
                    </div>
                </div>
                <div class="layui-card" style="height: 50px">
                    <div class="layui-card-header">
                        共<span> 10</span> 道
                    </div>
                </div>
                <div class="layui-card" style="height: 180px">
                    <div class="layui-row" style="padding-top: 30px">
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=1'}"><i class="iconfont icon-extend-1" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=2'}"><i class="iconfont icon-extend-2" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=3'}"><i class="iconfont icon-extend-3" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=4'}"><i class="iconfont icon-extend-4" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=5'}"><i class="iconfont icon-extend-5" style="margin-left: 60px"></i></a>
                    </div>
                    <div class="layui-row" style="padding-top: 50px">
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=6'}"><i class="iconfont icon-extend-6" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=7'}"><i class="iconfont icon-extend-7" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=8'}"><i class="iconfont icon-extend-8" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=9'}"><i class="iconfont icon-extend-9" style="margin-left: 60px"></i></a>
                        <a th:href="@{'/resultPage?testId='+${testId}+'&&page=10'}"><i class="iconfont icon-extend-10" style="margin-left:60px"></i></a>
                    </div>
                </div>
                <a type="button" class="layui-btn layui-btn-fluid" id="prePage" th:href="@{'/resultPage?testId='+${testId}+'&&page='+${questionList.prePage}}">上一题</a>
                <hr>
                <a type="button" class="layui-btn layui-btn-fluid" id="nextPage" th:href="@{'/resultPage?testId='+${testId}+'&&page='+${questionList.nextPage}}">下一题</a>
            </div>
        </div>
    </div>
</blockquote>


<script src="layui/layui.all.js"></script>
<script src="layui/layui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script type="text/javascript" src="layui/jquery.cookie.js"></script>
<script>
    var res = [[${res}]];
    var array = $('input[name=title]').eq(res);
    array.attr("checked","checked");

    var word = $('#word').val();
    var solution = $('#solution').val();
    if (word.eq(solution)){
        alert("相等");
    }
</script>

</body>
</html>